package work.service;

import org.onejava.core.annotation.IAop;
import org.onejava.core.annotation.IService;
import org.onejava.core.annotation.ServiceInfo;

@ServiceInfo(name = "dog")
public class DogService {
	@IService
	public CatService cat;
	
	public void catsay(){
		cat.say("Miao!!", "Miao~~~~~");
	}
	
	public void say(){
		System.out.println("Wang!!!");
	}
	@IAop(before = "beforelog")
	public void say(String name,String words){
		System.out.println("My Name Is :"+name+"and "+words);
	}
	
	public void error() throws Exception{
		throw new Exception("ERROR");
	}
}
